package com.offcn.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;

import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


/**
 * 本地文件夹挂载服务器操作
 */
@Configuration
public class MyConfiguration implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //把C:/dong/挂载到服务器的：http://localhost:9000/setmealpic路径下
        registry.addResourceHandler("/setmealpic/**").addResourceLocations("file:/Users/lazy-bay/Desktop/filename/");
    }
}